package com.example.teacherservice.dto;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
public class ProgressUpdateDTO {
    @NotNull(message = "学生ID不能为空")
    private Long studentId;

    @NotNull(message = "课程ID不能为空")
    private Long courseId;

    @NotNull(message = "章节ID不能为空")
    private Long chapterId;

    @NotNull(message = "当前进度不能为空")
    @Min(value = 0, message = "进度不能小于0")
    private Long currentPosition;

    @NotNull(message = "总时长不能为空")
    @Min(value = 1, message = "总时长必须大于0")
    private Long totalDuration;

    private Long learnedDuration;  // 累计学习时长（秒）
    private Integer learnedStatus; // 学习状态
}
